<?php
/*
 * [JINYUN!] (C)2001-2099 Jinyunweb.com
 * This is NOT a freeware, use is subject to license terms
 * $Id: 2017-12-13 03:39:35 apple $
*/
//渠道总览
/*渠道总览主要提供哪些数据展现？
	各渠道访问站点的总次数、占比。（只统计用户端数据，不统计管理端数据）
	
*/	
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'get';
if($_RQ['op']=='get'){
	$total=pdo_count('core_access_log',array('uniacid'=>$_SESSION['uniacid'],'this'=>2));
	$wxapp_num=pdo_count('core_access_log',array('uniacid'=>$_SESSION['uniacid'],'this'=>2,'os'=>1));
	$wechat_num=pdo_count('core_access_log',array('uniacid'=>$_SESSION['uniacid'],'this'=>2,'os'=>2));
	$mobile_num=pdo_count('core_access_log',array('uniacid'=>$_SESSION['uniacid'],'this'=>2,'os'=>3));
	$windows_num=pdo_count('core_access_log',array('uniacid'=>$_SESSION['uniacid'],'this'=>2,'os'=>4));
	$wxapp_bf=round($wxapp_num*100/$total);
	$wechat_bf=round($wechat_num*100/$total);
	$mobile_bf=round($mobile_num*100/$total);
	$windows_bf=round($windows_num*100/$total);
	$list=array();
	$list[]=array('title'=>'小程序','num'=>$wxapp_num,'bf'=>$wxapp_bf);
	$list[]=array('title'=>'微信端','num'=>$wechat_num,'bf'=>$wechat_bf);
	$list[]=array('title'=>'手机端','num'=>$mobile_num,'bf'=>$mobile_bf);
	$list[]=array('title'=>'PC端','num'=>$windows_num,'bf'=>$windows_bf);
	exi($return);
}


?>